package com.andova.ext

import kotlinx.coroutines.*

suspend fun launchMain(func: suspend CoroutineScope.() -> Unit) {
    withContext(Dispatchers.Main) { func() }
}

fun launchUI(func: () -> Unit) {
    GlobalScope.launch(Dispatchers.Main) { func() }
}

fun launchSuspend(func: suspend CoroutineScope.() -> Unit) {
    GlobalScope.launch { func() }
}